package com.movitech.mobile.cz.base.supplier.controller;

import com.movitech.mobile.cz.base.modules.controller.RestReturnResult;
import com.movitech.mobile.cz.base.supplier.entity.SCommentConfig;
import com.movitech.mobile.cz.base.supplier.entity.SHistoryComment;
import com.movitech.mobile.cz.base.supplier.entity.ext.SCommentConfigFindRequest;
import com.movitech.mobile.cz.base.supplier.service.SCommentConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by Administrator on 2018/3/13.
 */
@RestController
@RequestMapping("/v1/sEvaluation")
@Api(value = "配置表", description = "供方评估基础操作接口")
public class SCommentConfigController {

    @Autowired
    private SCommentConfigService sCommentConfigService;

    @PostMapping("/findSHistoryComment")
    @ApiOperation(value = "根据配置表code查询", notes = "根据配置表code查询")
    public RestReturnResult findSHistoryCommentByCode(@RequestBody SCommentConfigFindRequest request) {
        RestReturnResult restReturnResult = RestReturnResult.success();
        List<SCommentConfig> sCommentConfigs = sCommentConfigService.findSHistoryCommentByCode(request);
        restReturnResult.setData(sCommentConfigs);
        return restReturnResult;
    }
}
